import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/page',
    name: 'page',
    component: () => import( '../views/homePage.vue') //路由懒加载的形式
  },
  {
    path: '/',
    redirect: '/page'// 白屏时重定向
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
